package com.zd.service.lmpl;/**
 * @Description: TransportoutsourcingServicelmpl
 * @Author:pioneer
 * @Date: 2021-07-27
 * @Version:v1.0
 */

import com.zd.mapper.TransportoutsourcingMapper;
import com.zd.service.lnter.TransportoutsourcingServicelnter;
import com.zzg.entity.Departurelist;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: TransportoutsourcingServicelmpl
 * @Author:pioneer
 * @Date: 2021-07-27
 * @Version:v1.0
 */
@Service
public class TransportoutsourcingServicelmpl implements TransportoutsourcingServicelnter {
    @Autowired
    private TransportoutsourcingMapper transportoutsourcingMapper;
    /**
     * 查询运输外包列表相关的所有信息
     * @return 运输外包列表集合
     */
    @Override
    public List<Departurelist> selectTransportoutsourcinglist() {
        return transportoutsourcingMapper.selectTransportoutsourcinglist ();
    }

    /**
     * 分页查询运输外包列表相关的所有信息
     * @param page  页码
     * @param entry 条目数
     * @return 运输外包列表集合
     */
    @Override
    public List<Departurelist> pagingqueryTransportoutsourcinglist(int page, int entry) {
        return transportoutsourcingMapper.pagingqueryTransportoutsourcinglist ((page-1)*entry,entry);
    }

    /**
     * 通过运输外边单号查询运输外包
     * @param outsourcingid 运输外包单号
     * @return 运输外包对象
     */
    @Override
    public Departurelist getTransportoutsourcingByid(String outsourcingid) {
        return transportoutsourcingMapper.getTransportoutsourcingByid (outsourcingid);
    }

    /**
     * 通过多条件查询运输外包列表信息
     *
     * @param departurelist 运输外包列表对象
     * @return 运输外包列表集合
     */
    @Override
    public List<Departurelist> getTransportoutsourcingcondition(Departurelist departurelist) {
        return transportoutsourcingMapper.getTransportoutsourcingcondition (departurelist);
    }

    /**
     * 通过多条件查询运输外包列表信息并分页
     * @param departurelist 运输外包列表对象
     * @param page          页码
     * @param entry         条目数
     * @return 运输外包列表集合
     */
    @Override
    public List<Departurelist> conditionqueryTransportoutsourcinglist(Departurelist departurelist, int page, int entry) {
        return transportoutsourcingMapper.conditionqueryTransportoutsourcinglist (departurelist,(page-1)*entry,entry);
    }
}
